package com.heima.Service.impl;

import com.heima.Dao.BookDao;
import com.heima.Service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@Service("bookServiceImpl")
public class BookServiceImpl implements BookService {

    @Autowired
    @Qualifier("book2")
    private BookDao book;

    @Value("${id}")
    private int id;

    @Value("${name}")
    private String name;

    @Override
    public void save() {
        book.save();
        System.out.println("BookService save ...");
        System.out.println(id + name);
    }
}
